
using System;
using System.Collections;

namespace FutureOpen.Core
{
    #region Msg

    /// <summary>
    /// Msg string for NHibernate mapped table 'msg'.
    /// </summary>
    public class Msg
    {
        #region Member Variables

        protected int _msg_id;
        protected int _msg_from;
        protected int _msg_to;
        protected string _msg_subject;
        protected string _msg_content;
        protected short _msg_status;
        protected DateTime _msg_time;
        protected short _msg_type;

        #endregion

        #region Constructors

        public Msg() { }

        public Msg(int msg_from, int msg_to, string msg_subject, string msg_content, short msg_status, DateTime msg_time, short msg_type)
        {
            this._msg_from = msg_from;
            this._msg_to = msg_to;
            this._msg_subject = msg_subject;
            this._msg_content = msg_content;
            this._msg_status = msg_status;
            this._msg_time = msg_time;
            this._msg_type = msg_type;
        }

        #endregion

        #region Public Properties

        public virtual int Msg_id
        {
            get { return _msg_id; }
            set { _msg_id = value; }
        }

        public virtual int Msg_from
        {
            get { return _msg_from; }
            set { _msg_from = value; }
        }

        public virtual int Msg_to
        {
            get { return _msg_to; }
            set { _msg_to = value; }
        }

        public virtual string Msg_subject
        {
            get { return _msg_subject; }
            set
            {
                if (value != null && value.Length > 300)
                    throw new ArgumentOutOfRangeException("Invalid value for Msg_subject", value, value.ToString());
                _msg_subject = value;
            }
        }

        public virtual string Msg_content
        {
            get { return _msg_content; }
            set { _msg_content = value; }
        }

        public virtual short Msg_status
        {
            get { return _msg_status; }
            set { _msg_status = value; }
        }

        public virtual DateTime Msg_time
        {
            get { return _msg_time; }
            set { _msg_time = value; }
        }

        public virtual short Msg_type
        {
            get { return _msg_type; }
            set { _msg_type = value; }
        }

        #endregion


    }

    #endregion
}
